﻿using System.Linq;

namespace FitnessHelperDB
{
  public partial class FoodPlanDays
  {
    public double Calories
    {
      get { return FoodIntakes.Sum(foodIntake => foodIntake.Calories); }
    }

    public double Proteins
    {
      get { return FoodIntakes.Sum(foodIntake => foodIntake.Proteins); }
    }

    public double Carbohydrates
    {
      get { return FoodIntakes.Sum(foodIntake => foodIntake.Carbohydrates); }
    }

    public double Fats
    {
      get { return FoodIntakes.Sum(foodIntake => foodIntake.Fats); }
    }
  }
}
